import React from 'react'
import { Outlet , useNavigate } from 'react-router-dom'

export default function Home() {
    const navigate=useNavigate()
    const musicHandle=()=>{
        navigate('/main/home/music/?name=xyue&id=001')
    }
    const newsHandle=()=>{
        navigate('/main/home/news/?name=yuex&id=002')
    }
  return (
    <div>
        <h3>我是Home的内容</h3>
        <button onClick={musicHandle}>Music</button>
        <button onClick={newsHandle}>News</button>
        <Outlet/>
    </div>
  )
}
